package com.hrzyit.whistle.cases.data.api

import com.hrzyit.base.data.protocol.BaseResp
import com.hrzyit.whistle.cases.data.bean.CategoryDetailsEntity
import com.hrzyit.whistle.cases.data.bean.CategoryEntity
import com.hrzyit.whistle.cases.data.bean.SysDictEntity
import com.hrzyit.whistle.cases.data.protocol.CategoryDetailsReq
import com.hrzyit.whistle.cases.data.protocol.CategoryReq
import com.hrzyit.whistle.cases.data.protocol.SysDictReq
import retrofit2.http.Body
import retrofit2.http.POST
//import rx.Observable
import io.reactivex.Observable

/**
 * 案件类型相关操作 API 接口
 * @author YangWei
 * @date 2019/3/31
 */
interface CaseCategoryApi {

    /**
     * 获取案件类型列表：问题类型
     * @author YangWei
     * @date 2019/3/25
     * @param req @{link SysDictReq}
     * @return List<SysDictEntity> 案件类型：问题类型
     */
    @POST(value = "case/category/getCaseQuestionTypeList")
    fun getCaseQuestionTypeList(@Body req:SysDictReq): Observable<BaseResp<MutableList<SysDictEntity>>>

    /**
     * 获取案件类型列表：大类、小类
     * @author YangWei
     * @date 2019/3/25
     * @param req   @see CategoryReq
     * @return List<CategoryEntity> 案件类型：大类或小类列表
     */
    @POST(value = "case/category/getCategoryList")
    fun getCategoryList(@Body req:CategoryReq):Observable<BaseResp<MutableList<CategoryEntity>>>

    /**
     * 获取案件立案条件列表
     * @author YangWei
     * @date 2019/4/6
     * @param req   @see CategoryReq
     * @return List<CategoryDetailsEntity> 案件立案条件列表
     */
    @POST(value = "case/category/getCategoryDetailsList")
    fun getCategoryDetailsList(@Body req: CategoryDetailsReq):Observable<BaseResp<MutableList<CategoryDetailsEntity>>>

}